home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Freeware 1999 August
/
SGI Freeware 1999 August.iso
/
dist
/
fw_xemacs.idb
/
usr
/
freeware
/
lib
/
xemacs-20.4
/
info
/
xemacs-faq.info-3.z
/
xemacs-faq.info-3
Encoding:
Amiga (detected)
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
GNU Info File
|
1998-05-21
|
47.8 KB
|
1,406 lines
This is Info file ../info/xemacs-faq.info, produced by Makeinfo version
1.68 from the input file xemacs-faq.texi.
File: xemacs-faq.info, Node: Q3.0.1, Next: Q3.0.2, Prev: Customization, Up: Customization
What version of Emacs am I running?
===================================
How can `.emacs' determine which of the family of Emacsen I am using?
To determine if you are currently running GNU Emacs 18, GNU Emacs 19,
XEmacs 19, XEmacs 20, or Epoch, and use appropriate code, check out the
example given in `etc/sample.emacs'. There are other nifty things in
there as well!
For all new code, all you really need to do is:
(defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))
File: xemacs-faq.info, Node: Q3.0.2, Next: Q3.0.3, Prev: Q3.0.1, Up: Customization
How can I evaluate Emacs-Lisp expressions?
==========================================
I know I can evaluate Elisp expressions from `*scratch*' buffer with
`C-j' after the expression. How do I do it from another buffer?
Press `M-:' (the default binding of `eval-expression'), and enter
the expression to the minibuffer. In XEmacs prior to 19.15
`eval-expression' used to be a disabled command by default. If this is
the case, upgrade your XEmacs.
File: xemacs-faq.info, Node: Q3.0.3, Next: Q3.0.4, Prev: Q3.0.2, Up: Customization
`(setq tab-width 6)' behaves oddly.
===================================
If you put `(setq tab-width 6)' in your `.emacs' file it does not
work! Is there a reason for this? If you do it at the EVAL prompt it
works fine!! How strange.
Use `setq-default' instead, since `tab-width' is all-buffer-local.
File: xemacs-faq.info, Node: Q3.0.4, Next: Q3.0.5, Prev: Q3.0.3, Up: Customization
How can I add directories to the `load-path'?
=============================================
Here are two ways to do that, one that puts your directories at the
front of the load-path, the other at the end:
;;; Add things at the beginning of the load-path, do not add
;;; duplicate directories:
(pushnew "bar" load-path :test 'equal)
(pushnew "foo" load-path :test 'equal)
;;; Add things at the end, unconditionally
(setq load-path (nconc load-path '("foo" "bar")))
keith (k.p.) hanlan <keithh@nortel.ca> writes:
To add directories using Unix shell metacharacters use
`expand-file-name' like this:
(push (expand-file-name "~keithh/.emacsdir") load-path)
File: xemacs-faq.info, Node: Q3.0.5, Next: Q3.0.6, Prev: Q3.0.4, Up: Customization
How to check if a lisp function is defined?
===========================================
Use the following elisp:
(fboundp 'foo)
It's almost always a mistake to test `emacs-version' or any similar
variables.
Instead, use feature-tests, such as `featurep', `boundp', `fboundp',
or even simple behavioural tests, eg.:
(defvar foo-old-losing-code-p
(condition-case nil (progn (losing-code t) nil)
(wrong-number-of-arguments t)))
There is an incredible amount of broken code out there which could
work much better more often in more places if it did the above instead
of trying to divine its environment from the value of one variable.
File: xemacs-faq.info, Node: Q3.0.6, Next: Q3.0.7, Prev: Q3.0.5, Up: Customization
Can I force the output of `(face-list)' to a buffer?
====================================================
It would be good having it in a buffer, as the output of
`(face-list)' is too wide to fit to a minibuffer.
Evaluate the expression in the `*scratch*' buffer with point after
the rightmost paren and typing `C-j'.
If the minibuffer smallness is the only problem you encounter, you
can simply press `C-h l' to get the former minibuffer contents in a
buffer.
File: xemacs-faq.info, Node: Q3.0.7, Next: Q3.0.8, Prev: Q3.0.6, Up: Customization
Font selections in don't get saved after `Save Options'.
========================================================
For XEmacs 19.14 and previous:
John Mann <mannj@ll.mit.edu> writes:
You have to go to Options->Menubar Appearance and unselect
`Frame-Local Font Menu'. If this option is selected, font changes
are only applied to the *current* frame and do *not* get saved
when you save options.
For XEmacs 19.15 and later:
Implement the above as well as set the following in your `.emacs'
(setq options-save-faces t)
File: xemacs-faq.info, Node: Q3.0.8, Next: Q3.0.9, Prev: Q3.0.7, Up: Customization
How do I get a single minibuffer frame?
=======================================
Vin Shelton <acs@acm.org> writes:
(setq initial-frame-plist '(minibuffer nil))
(setq default-frame-plist '(minibuffer nil))
(setq default-minibuffer-frame
(make-frame
'(minibuffer only
width 86
height 1
menubar-visible-p nil
default-toolbar-visible-p nil
name "minibuffer"
top -2
left -2
has-modeline-p nil)))
(frame-notice-user-settings)
*NOTE:* The single minibuffer frame may not be to everyone's taste,
and there any number of other XEmacs options settings that may make it
difficult or inconvenient to use.
File: xemacs-faq.info, Node: Q3.0.9, Next: Q3.1.1, Prev: Q3.0.8, Up: Customization
`Customize'.
============
Strating with XEmacs 20.2 there is new system 'Customize' for
customizing XEmacs options.
You can access `Customize' from the `Options' menu or invoking one
of customize commands byt typing eg. `M-x customize', `M-x
customize-face', `M-x customize-variable' or `M-x customize-apropos'.
Strating with XEmacs 20.3 there is also new `browser' mode for
Customize. Try it out with `M-x customize-browse'
File: xemacs-faq.info, Node: Q3.1.1, Next: Q3.1.2, Prev: Q3.0.9, Up: Customization
Where is a list of X resources?
===============================
Search through the `NEWS' file for `X Resources'. A fairly
comprehensive list is given after it.
In addition, an `app-defaults' file is supplied, `etc/Emacs.ad'
listing the defaults. The file `etc/sample.Xdefaults' gives a set of
defaults that you might consider. It is essentially the same as
`etc/Emacs.ad' but some entries are slightly altered. Be careful about
installing the contents of this file into your `.Xdefaults' or
`.Xresources' file if you use GNU Emacs under X11 as well.
File: xemacs-faq.info, Node: Q3.1.2, Next: Q3.1.3, Prev: Q3.1.1, Up: Customization
How can I detect a color display?
=================================
You can test the return value of the function `(device-class)', as
in:
(when (eq (device-class) 'color)
(set-face-foreground 'font-lock-comment-face "Grey")
(set-face-foreground 'font-lock-string-face "Red")
....
)
File: xemacs-faq.info, Node: Q3.1.3, Next: Q3.1.4, Prev: Q3.1.2, Up: Customization
`(set-screen-width)' worked in 19.6, but not in 19.13?
======================================================
In Lucid Emacs 19.6 I did `(set-screen-width CHARACTERS)' and
`(set-screen-height LINES)' in my `.emacs' instead of specifying
`Emacs*EmacsScreen.geometry' in my `.Xdefaults' but this does not work
in XEmacs 19.13.
These two functions now take frame arguments:
(set-frame-width (selected-frame) CHARACTERS)
(set-frame-height (selected-frame) LINES)
File: xemacs-faq.info, Node: Q3.1.4, Next: Q3.1.5, Prev: Q3.1.3, Up: Customization
Specifiying `Emacs*EmacsScreen.geometry' in `.emacs' does not work in 19.15?
============================================================================
In XEmacs 19.11 I specified `Emacs*EmacsScreen.geometry' in my
`.emacs' but this does not work in XEmacs 19.15.
We have switched from using the term "screen" to using the term
"frame".
The correct entry for your `.Xdefaults' is now:
Emacs*EmacsFrame.geometry
File: xemacs-faq.info, Node: Q3.1.5, Next: Q3.1.6, Prev: Q3.1.4, Up: Customization
How can I get the icon to just say `XEmacs'?
============================================
I'd like the icon to just say `XEmacs', and not include the name of
the current file in it.
Add the following line to your `.emacs':
(setq frame-icon-title-format "XEmacs")
File: xemacs-faq.info, Node: Q3.1.6, Next: Q3.1.7, Prev: Q3.1.5, Up: Customization
How can I have the window title area display the full path?
===========================================================
I'd like to have the window title area display the full
directory/name of the current buffer file and not just the name.
Add the following line to your `.emacs':
(setq frame-title-format "%S: %f")
A more sophisticated title might be:
(setq frame-title-format
'("%S: " (buffer-file-name "%f" (dired-directory dired-directory "%b"))))
That is, use the file name, or the dired-directory, or the buffer
name.
File: xemacs-faq.info, Node: Q3.1.7, Next: Q3.1.8, Prev: Q3.1.6, Up: Customization
`xemacs -name junk' doesn't work?
=================================
When I run `xterm -name junk', I get an xterm whose class name
according to xprop, is `junk'. This is the way it's supposed to work,
I think. When I run `xemacs -name junk' the class name is not set to
`junk'. It's still `emacs'. What does `xemacs -name' really do? The
reason I ask is that my window manager (fvwm) will make a window sticky
and I use XEmacs to read my mail. I want that XEmacs window to be
sticky, without having to use the window manager's function to set the
window sticky. What gives?
`xemacs -name' sets the application name for the program (that is,
the thing which normally comes from `argv[0]'). Using `-name' is the
same as making a copy of the executable with that new name. The
`WM_CLASS' property on each frame is set to the frame-name, and the
application-class. So, if you did `xemacs -name FOO' and then created
a frame named BAR, you'd get an X window with WM_CLASS = `( "BAR",
"Emacs")'. However, the resource hierarchy for this widget would be:
Name: FOO .shell .container .BAR
Class: Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame
instead of the default
Name: xemacs.shell .container .emacs
Class: Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame
It is arguable that the first element of WM_CLASS should be set to
the application-name instead of the frame-name, but I think that's less
flexible, since it does not give you the ability to have multiple frames
with different WM_CLASS properties. Another possibility would be for
the default frame name to come from the application name instead of
simply being `emacs'. However, at this point, making that change would
be troublesome: it would mean that many users would have to make yet
another change to their resource files (since the default frame name
would suddenly change from `emacs' to `xemacs', or whatever the
executable happened to be named), so we'd rather avoid it.
To make a frame with a particular name use:
(make-frame '((name . "the-name")))
File: xemacs-faq.info, Node: Q3.1.8, Next: Q3.2.1, Prev: Q3.1.7, Up: Customization
`-iconic' doesn't work.
=======================
When I start up XEmacs using `-iconic' it doesn't work right. Using
`-unmapped' on the command line, and setting the `initiallyUnmapped' X
Resource don't seem to help much either...
Ben Wing <ben@666.com> writes:
Ugh, this stuff is such an incredible mess that I've about given up
getting it to work. The principal problem is numerous
window-manager bugs...
File: xemacs-faq.info, Node: Q3.2.1, Next: Q3.2.2, Prev: Q3.1.8, Up: Customization
How can I set color options from `.emacs'?
==========================================
How can I set the most commonly used color options from my `.emacs'
instead of from my `.Xdefaults'?
Like this:
(set-face-background 'default "bisque") ; frame background
(set-face-foreground 'default "black") ; normal text
(set-face-background 'zmacs-region "red") ; When selecting w/
; mouse
(set-face-foreground 'zmacs-region "yellow")
(set-face-font 'default "*courier-bold-r*120-100-100*")
(set-face-background 'highlight "blue") ; Ie when selecting buffers
(set-face-foreground 'highlight "yellow")
(set-face-background 'modeline "blue") ; Line at bottom of buffer
(set-face-foreground 'modeline "white")
(set-face-font 'modeline "*bold-r-normal*140-100-100*")
(set-face-background 'isearch "yellow") ; When highlighting while
; searching
(set-face-foreground 'isearch "red")
(setq x-pointer-foreground-color "black") ; Adds to bg color,
; so keep black
(setq x-pointer-background-color "blue") ; This is color you really
; want ptr/crsr
File: xemacs-faq.info, Node: Q3.2.2, Next: Q3.2.3, Prev: Q3.2.1, Up: Customization
How do I set the text, menu and modeline fonts?
===============================================
Note that you should use `Emacs.' and not `Emacs*' when setting face
values.
In `.Xdefaults':
Emacs.default.attributeFont: -*-*-medium-r-*-*-*-120-*-*-m-*-*-*
Emacs*menubar*font: fixed
Emacs.modeline.attributeFont: fixed
This is confusing because modeline is a face, and can be found listed
with all faces in the current mode by using `M-x set-face-font (enter)
?'. It uses the face specification of `attributeFont', while menubar
is a normal X thing that uses the specification `font'. With Motif it
may be necessary to use `fontList' instead of `font'.
File: xemacs-faq.info, Node: Q3.2.3, Next: Q3.2.4, Prev: Q3.2.2, Up: Customization
How can I set the colors when highlighting a region?
====================================================
How can I set the background/foreground colors when highlighting a
region?
You can change the face `zmacs-region' either in your `.Xdefaults':
Emacs.zmacs-region.attributeForeground: firebrick
Emacs.zmacs-region.attributeBackground: lightseagreen
or in your `.emacs':
(set-face-background 'zmacs-region "red")
(set-face-foreground 'zmacs-region "yellow")
File: xemacs-faq.info, Node: Q3.2.4, Next: Q3.2.5, Prev: Q3.2.3, Up: Customization
How can I limit color map usage?
================================
I'm using Netscape (or another color grabber like XEmacs); is there
anyway to limit the number of available colors in the color map?
XEmacs 19.13 didn't have such a mechanism (unlike netscape, or other
color-hogs). One solution is to start XEmacs prior to netscape, since
this will prevent Netscape from grabbing all colors (but Netscape will
complain). You can use the flags for Netscape, like -mono, -ncols <#>
or -install (for mono, limiting to <#> colors, or for using a private
color map). Since Netscape will take the entire colormap and never
release it, the only reasonable way to run it is with `-install'.
If you have the money, another solution would be to use a truecolor
or direct color video.
Starting with XEmacs 19.14, XEmacs uses the closest available color
if the colormap is full, so it's O.K. now to start Netscape first.
File: xemacs-faq.info, Node: Q3.2.5, Next: Q3.3.1, Prev: Q3.2.4, Up: Customization
My tty supports color, but XEmacs doesn't use them.
===================================================
XEmacs tries to automatically determine whether your tty supports
color, but sometimes guesses wrong. In that case, you can make XEmacs
Do The Right Thing using this Lisp code:
(if (eq 'tty (device-type))
(set-device-class nil 'color))
File: xemacs-faq.info, Node: Q3.3.1, Next: Q3.3.2, Prev: Q3.2.5, Up: Customization
How can I make the modeline go away?
====================================
(set-specifier has-modeline-p nil)
Starting with XEmacs 19.14 the modeline responds to mouse clicks, so
if you haven't liked or used the modeline in the past, you might want to
try the new version out.
File: xemacs-faq.info, Node: Q3.3.2, Next: Q3.3.3, Prev: Q3.3.1, Up: Customization
How do you have XEmacs display the line number in the modeline?
===============================================================
Add the following line to your `.emacs' file to display the line
number:
(line-number-mode 1)
Use the following to display the column number:
(column-number-mode 1)
Or select from the `Options' menu
`Customize->Emacs->Editing->Basics->Line Number Mode' and/or
`Customize->Emacs->Editing->Basics->Column Number Mode'
Or type `M-x customize RET editing-basics RET'.
File: xemacs-faq.info, Node: Q3.3.3, Next: Q3.3.4, Prev: Q3.3.2, Up: Customization
How do I get XEmacs to put the time of day on the modeline?
===========================================================
Add the following line to your `.emacs' file to display the time:
(display-time)
See `Customize' from the `Options' menu for customization.
File: xemacs-faq.info, Node: Q3.3.4, Next: Q3.3.5, Prev: Q3.3.3, Up: Customization
How do I turn off current chapter from AUC TeX modeline?
========================================================
With AUC TeX, fast typing is hard because the current chapter,
section etc. are given in the modeline. How can I turn this off?
It's not AUC TeX, it comes from `func-menu' in `func-menu.el'. Add
this code to your `.emacs' to turn it off:
(setq fume-display-in-modeline-p nil)
Or just add a hook to `TeX-mode-hook' to turn it off only for TeX
mode:
(add-hook 'TeX-mode-hook '(lambda () (setq fume-display-in-modeline-p nil)))
David Hughes <dhughes@origin-at.co.uk> writes:
If you have 19.14 or later, try this instead; you'll still get the
function name displayed in the modeline, but it won't attempt to
keep track when you modify the file. To refresh when it gets out
of synch, you simply need click on the `Rescan Buffer' option in
the function-menu.
(setq-default fume-auto-rescan-buffer-p nil)
File: xemacs-faq.info, Node: Q3.3.5, Next: Q3.4.1, Prev: Q3.3.4, Up: Customization
How can one change the modeline color based on the mode used?
=============================================================
You can use something like the following:
(add-hook 'lisp-mode-hook
(lambda ()
(set-face-background 'modeline "red" (current-buffer))))
Then, when editing a Lisp file (i.e. when in Lisp mode), the modeline
colors change from the default set in your `.emacs'. The change will
only be made in the buffer you just entered (which contains the Lisp
file you are editing) and will not affect the modeline colors anywhere
else.
Notes:
* The hook is the mode name plus `-hook'. eg. c-mode-hook,
c++-mode-hook, emacs-lisp-mode-hook (used for your `.emacs' or a
`xx.el' file), lisp-interaction-mode-hook (the `*scratch*'
buffer), text-mode-hook, etc.
* Be sure to use `add-hook', not `(setq c-mode-hook xxxx)',
otherwise you will erase anything that anybody has already put on
the hook.
* You can also do `(set-face-font 'modeline FONT)', eg.
`(set-face-font 'modeline "*bold-r-normal*140-100-100*"
(current-buffer))' if you wish the modeline font to vary based on
the current mode.
This works in 19.15 as well, but there are additional modeline faces,
`modeline-buffer-id', `modeline-mousable', and
`modeline-mousable-minor-mode', which you may want to customize.
File: xemacs-faq.info, Node: Q3.4.1, Next: Q3.4.2, Prev: Q3.3.5, Up: Customization
How do I open a frame on another screen of my multi-headed display?
===================================================================
The support for this was revamped for 19.14. Use the command `M-x
make-frame-on-display'. This command is also on the File menu in the
menubar.
XEmacs 19.14 and later also have the command `make-frame-on-tty'
which will establish a connection to any tty-like device. Opening the
TTY devices should be left to `gnuclient', though.
File: xemacs-faq.info, Node: Q3.4.2, Next: Q3.5.1, Prev: Q3.4.1, Up: Customization
Can I really connect to a running XEmacs after calling up over a modem? How?
=============================================================================
If you're not running at least XEmacs 19.14, you can't. Otherwise
check out the `gnuattach' program supplied with XEmacs. Starting with
XEmacs 20.3, `gnuattach' and `gnudoit' functionality will be provided
by `gnuclient'.
File: xemacs-faq.info, Node: Q3.5.1, Next: Q3.5.2, Prev: Q3.4.2, Up: Customization
How can I bind complex functions (or macros) to keys?
=====================================================
As an example, say you want the `paste' key on a Sun keyboard to
insert the current Primary X selection at point. You can accomplish this
with:
(define-key global-map [f18] 'x-insert-selection)
However, this only works if there is a current X selection (the
selection will be highlighted). The functionality I like is for the
`paste' key to insert the current X selection if there is one,
otherwise insert the contents of the clipboard. To do this you need to
pass arguments to `x-insert-selection'. This is done by wrapping the
call in a 'lambda form:
(global-set-key [f18]
(lambda () (interactive) (x-insert-selection t nil)))
This binds the f18 key to a "generic" functional object. The
interactive spec is required because only interactive functions can be
bound to keys.
For the FAQ example you could use:
(global-set-key [(control ?.)]
(lambda () (interactive) (scroll-up 1)))
(global-set-key [(control ?;)]
(lambda () (interactive) (scroll-up -1)))
This is fine if you only need a few functions within the lambda body.
If you're doing more it's cleaner to define a separate function as in
question 3.5.3 (*Note Q3.5.3::).
File: xemacs-faq.info, Node: Q3.5.2, Next: Q3.5.3, Prev: Q3.5.1, Up: Customization
How can I stop down-arrow from adding empty lines to the bottom of my buffers?
==============================================================================
Add the following line to your `.emacs' file:
(setq next-line-add-newlines nil)
This has been the default setting in XEmacs for some time.
File: xemacs-faq.info, Node: Q3.5.3, Next: Q3.5.4, Prev: Q3.5.2, Up: Customization
How do I bind C-. and C-; to scroll one line up and down?
=========================================================
Add the following (Thanks to Richard Mlynarik <mly@adoc.xerox.com>
and Wayne Newberry <wayne@zen.cac.stratus.com>) to `.emacs':
(defun scroll-up-one-line ()
(interactive)
(scroll-up 1))
(defun scroll-down-one-line ()
(interactive)
(scroll-down 1))
(global-set-key [(control ?.)] 'scroll-up-one-line) ; C-.
(global-set-key [(control ?;)] 'scroll-down-one-line) ; C-;
The key point is that you can only bind simple functions to keys; you
can not bind a key to a function that you're also passing arguments to.
(*Note Q3.5.1:: for a better answer).
File: xemacs-faq.info, Node: Q3.5.4, Next: Q3.5.5, Prev: Q3.5.3, Up: Customization
Globally binding `Delete'?
==========================
I cannot manage to globally bind my `Delete' key to something other
than the default. How does one do this?
(defun foo ()
(interactive)
(message "You hit DELETE"))
(global-set-key 'delete 'foo)
However, some modes explicitly bind `Delete', so you would need to
add a hook that does `local-set-key' for them. If what you want to do
is make the Backspace and Delete keys work more PC/Motif-like, then
take a look at the `delbs.el' package.
New in XEmacs 19.14 is a variable called `key-translation-map' which
makes it easier to bind `Delete'. `delbs.el' is a good example of how
to do this correctly.
Also *Note Q3.5.10::.
File: xemacs-faq.info, Node: Q3.5.5, Next: Q3.5.6, Prev: Q3.5.4, Up: Customization
Scrolling one line at a time.
=============================
Can the cursor keys scroll the screen a line at a time, rather than
the default half page jump? I tend it to find it disorienting.
Try this:
(defun scroll-one-line-up (&optional arg)
"Scroll the selected window up (forward in the text) one line (or N lines)."
(interactive "p")
(scroll-up (or arg 1)))
(defun scroll-one-line-down (&optional arg)
"Scroll the selected window down (backward in the text) one line (or N)."
(interactive "p")
(scroll-down (or arg 1)))
(global-set-key [up] 'scroll-one-line-up)
(global-set-key [down] 'scroll-one-line-down)
The following will also work but will affect more than just the
cursor keys (i.e. `C-n' and `C-p'):
(setq scroll-step 1)
You can change this also with Customize. Select from the `Options'
menu `Customize->Emacs->Environment->Windows->Scroll Step...' or type
`M-x customize RET windows RET'.
File: xemacs-faq.info, Node: Q3.5.6, Next: Q3.5.7, Prev: Q3.5.5, Up: Customization
How to map `Help' key alone on Sun type4 keyboard?
==================================================
The following works in GNU Emacs 19:
(global-set-key [help] 'help-command) ;; Help
The following works in XEmacs 19.15 with the addition of shift:
(global-set-key [(shift help)] 'help-command) ;; Help
But it doesn't work alone. This is in the file `PROBLEMS' which
should have come with your XEmacs installation: *Emacs ignores the
`help' key when running OLWM*.
OLWM grabs the `help' key, and retransmits it to the appropriate
client using `XSendEvent'. Allowing Emacs to react to synthetic events
is a security hole, so this is turned off by default. You can enable
it by setting the variable `x-allow-sendevents' to t. You can also
cause fix this by telling OLWM to not grab the help key, with the null
binding `OpenWindows.KeyboardCommand.Help:'.
File: xemacs-faq.info, Node: Q3.5.7, Next: Q3.5.8, Prev: Q3.5.6, Up: Customization
How can you type in special characters in XEmacs?
=================================================
One way is to use the package `x-compose'. Then you can use
sequences like `Compose " a' to get Σ, etc.
Another way is to use the iso-ascii package, provided in XEmacs 19.15
and later.
File: xemacs-faq.info, Node: Q3.5.8, Next: Q3.5.9, Prev: Q3.5.7, Up: Customization
Why does `(global-set-key [delete-forward] 'delete-char)' complain?
===================================================================
Why does `(define-key global-map [ delete-forward ] 'delete-char)'
complain of not being able to bind an unknown key?
Try this instead:
(define-key global-map [delete_forward] 'delete-char)
and it will work.
What you are seeing above is a bug due to code that is trying to
check for GNU Emacs syntax like:
(define-key global-map [C-M-a] 'delete-char)
which otherwise would cause no errors but would not result in the
expected behavior.
This bug has been fixed in 19.14.
File: xemacs-faq.info, Node: Q3.5.9, Next: Q3.5.10, Prev: Q3.5.8, Up: Customization
How do I make the Delete key delete forward?
============================================
Use the `delbs' package:
(require 'delbs)
This will give you the functions `delbs-enable-delete-forward' to
set things up, and `delbs-disable-delete-forward' to revert to "normal"
behavior.
You can change this also with Customize. Select from the `Options'
menu `Customize->Emacs->Editing->Basics->Delete Key Deletes Forward' or
type `M-x customize RET editing-basics RET'.
Also *Note Q3.5.4::.
File: xemacs-faq.info, Node: Q3.5.10, Next: Q3.6.1, Prev: Q3.5.9, Up: Customization
Can I turn on "sticky" modifier keys?
=====================================
Yes, with `(setq modifier-keys-are-sticky t)'. This will give the
effect of being able to press and release Shift and have the next
character typed come out in upper case. This will affect all the other
modifier keys like Control and Meta as well.
Ben Wing <ben@666.com> writes:
One thing about the sticky modifiers is that if you move the mouse
out of the frame and back in, it cancels all currently "stuck"
modifiers.
File: xemacs-faq.info, Node: Q3.6.1, Next: Q3.6.2, Prev: Q3.5.10, Up: Customization
Is there a way to make the bar cursor thicker?
==============================================
I'd like to have the bar cursor a little thicker, as I tend to
"lose" it often.
For a 1 pixel bar cursor, use:
(setq bar-cursor t)
For a 2 pixel bar cursor, use:
(setq bar-cursor 'anything-else)
You can also change these with Customize. Select from the `Options'
menu `Customize->Emacs->Environment->Display->Bar Cursor...' or type
`M-x customize RET display RET'.
You can use a color to make it stand out better:
Emacs*cursorColor: Red
File: xemacs-faq.info, Node: Q3.6.2, Next: Q3.6.3, Prev: Q3.6.1, Up: Customization
Is there a way to get back the block cursor?
============================================
(setq bar-cursor nil)
You can also change this with Customize. Select from the `Options'
menu `Customize->Emacs->Environment->Display->Bar Cursor...' or type
`M-x customize RET display RET'.
File: xemacs-faq.info, Node: Q3.6.3, Next: Q3.7.1, Prev: Q3.6.2, Up: Customization
Can I make the cursor blink?
============================
If you are running a version of XEmacs older than 19.14, no.
Otherwise you can do the following:
(blink-cursor-mode)
This function toggles between a steady cursor and a blinking cursor.
You may also set this mode from the menu bar by selecting `Options =>
Frame Appearance => Blinking Cursor'.
File: xemacs-faq.info, Node: Q3.7.1, Next: Q3.7.2, Prev: Q3.6.3, Up: Customization
How can I turn off Mouse pasting?
=================================
I keep hitting the middle mouse button by accident and getting stuff
pasted into my buffer so how can I turn this off?
Here is an alternative binding, whereby the middle mouse button
selects (but does not cut) the expression under the mouse. Clicking
middle on a left or right paren will select to the matching one. Note
that you can use `define-key' or `global-set-key'.
(defun mouse-set-point-and-select (event)
"Sets the point at the mouse location, then marks following form"
(interactive "@e")
(mouse-set-point event)
(mark-sexp 1))
(define-key global-map [button2] 'mouse-set-point-and-select)
File: xemacs-faq.info, Node: Q3.7.2, Next: Q3.7.3, Prev: Q3.7.1, Up: Customization
How do I set control/meta/etc modifiers on mouse buttons?
=========================================================
Use, for instance, `[(meta button1)]'. For example, here is a common
setting for Common Lisp programmers who use the bundled ilisp package,
whereby meta-button1 on a function name will find the file where the
function name was defined, and put you at that location in the source
file.
[Inside a function that gets called by the lisp-mode-hook and
ilisp-mode-hook]
(local-set-key [(meta button1)] 'edit-definitions-lisp)
File: xemacs-faq.info, Node: Q3.7.3, Next: Q3.7.4, Prev: Q3.7.2, Up: Customization
Clicking the left button does not do anything in buffer list.
=============================================================
I do `C-x C-b' to get a list of buffers and the entries get
highlighted when I move the mouse over them but clicking the left mouse
does not do anything.
Use the middle mouse button.
File: xemacs-faq.info, Node: Q3.7.4, Next: Q3.7.5, Prev: Q3.7.3, Up: Customization
How can I get a list of buffers when I hit mouse button 3?
==========================================================
The following code will replace the default popup on button3:
(global-set-key [button3] 'popup-buffer-menu)
File: xemacs-faq.info, Node: Q3.7.5, Next: Q3.7.6, Prev: Q3.7.4, Up: Customization
Why does cut-and-paste not work between XEmacs and a cmdtool?
=============================================================
We don't know. It's a bug. There does seem to be a work-around,
however. Try running xclipboard first. It appears to fix the problem
even if you exit it. (This should be mostly fixed in 19.13, but we
haven't yet verified that).
File: xemacs-faq.info, Node: Q3.7.6, Next: Q3.7.7, Prev: Q3.7.5, Up: Customization
How I can set XEmacs up so that it pastes where the text cursor is?
===================================================================
By default XEmacs pastes X selections where the mouse pointer is.
How do I disable this?
Examine the function `mouse-yank', by typing `C-h f mouse-yank RET'.
To get XEmacs to paste at the text cursor, add this your `.emacs':
(setq mouse-yank-at-point t)
File: xemacs-faq.info, Node: Q3.7.7, Next: Q3.7.8, Prev: Q3.7.6, Up: Customization
How do I select a rectangular region?
=====================================
Just select the region normally, then use the rectangle commands
(e.g. `kill-rectangle' on it. The region does not highlight as a
rectangle, but the commands work just fine.
To actually sweep out rectangular regions with the mouse do the
following:
(setq mouse-track-rectangle-p t)
Aki Vehtari <Aki.Vehtari@hut.fi> writes:
To actually sweep out rectangular regions with the mouse you can
also use `mouse-track-do-rectangle' which is assigned to
`M-button1'. Then use rectangle commands.
mouse-track-do-rectangle: (event)
-- an interactive compiled Lisp function.
Like `mouse-track' but selects rectangles instead of regions.
File: xemacs-faq.info, Node: Q3.7.8, Next: Q3.8.1, Prev: Q3.7.7, Up: Customization
Why does `M-w' take so long?
============================
It actually doesn't. It leaves the region visible for a second so
that you can see what area is being yanked. If you start working,
though, it will immediately complete its operation. In other words, it
will only delay for a second if you let it.
File: xemacs-faq.info, Node: Q3.8.1, Next: Q3.8.2, Prev: Q3.7.8, Up: Customization
How do I get rid of the menu (or menubar)?
==========================================
If you are running XEmacs 19.13 and earlier, add this command to your
`.emacs'.
(set-menubar nil)
Starting with XEmacs 19.14 the preferred method is:
(set-specifier menubar-visible-p nil)
File: xemacs-faq.info, Node: Q3.8.2, Next: Q3.8.3, Prev: Q3.8.1, Up: Customization
Can I customize the basic menubar?
==================================
For an extensive menubar, add this line to your `.emacs':
(load "big-menubar")
If you'd like to write your own, this file provides as good a set of
examples as any to start from. The file is located in
`lisp/packages/big-menubar.el' in the XEmacs installation directory.
File: xemacs-faq.info, Node: Q3.8.3, Next: Q3.8.4, Prev: Q3.8.2, Up: Customization
How do I control how many buffers are listed in the menu `Buffers List'?
========================================================================
Add the following to your `.emacs' (suit to fit):
(setq buffers-menu-max-size 20)
For no limit, use an argument of `nil'.
File: xemacs-faq.info, Node: Q3.8.4, Next: Q3.8.5, Prev: Q3.8.3, Up: Customization
Resources like `Emacs*menubar*font' are not working?
====================================================
I am trying to use a resource like `Emacs*menubar*font' to set the
font of the menubar but it's not working.
If you are using the real Motif menubar, this resource is not
recognized; you have to say:
Emacs*menubar*fontList: FONT
If you are using the Lucid menubar, the former resource will be
recognized only if the latter resource is unset. This means that the
resource
*fontList: FONT
will override
Emacs*menubar*font: FONT
even though the latter is more specific.
File: xemacs-faq.info, Node: Q3.8.5, Next: Q3.9.1, Prev: Q3.8.4, Up: Customization
How can I bind a key to a function to toggle the toolbar?
=========================================================
Try something like:
(defun my-toggle-toolbar ()
(interactive)
(set-specifier default-toolbar-visible-p
(not (specifier-instance default-toolbar-visible-p))))
(global-set-key "\C-xT" 'my-toggle-toolbar)
There are redisplay bugs in 19.14 that may make the preceding result
in a messed-up display, especially for frames with multiple windows.
You may need to resize the frame before XEmacs completely realizes the
toolbar is really gone.
Thanks to Martin Buchholz <Martin.Buchholz@sun.com> for the correct
code.
File: xemacs-faq.info, Node: Q3.9.1, Next: Q3.9.2, Prev: Q3.8.5, Up: Customization
How can I disable the scrollbar?
================================
To disable them for all frames, add the following line to your
`.Xdefaults':
Emacs.scrollBarWidth: 0
To turn the scrollbar off on a per-frame basis, use the following
function:
(set-specifier scrollbar-width 0 (selected-frame))
You can actually turn the scrollbars on at any level you want by
substituting for (selected-frame) in the above command. For example, to
turn the scrollbars off only in a single buffer:
(set-specifier scrollbar-width 0 (current-buffer))
In XEmacs versions prior to 19.14, you had to use the hairier
construct:
(set-specifier scrollbar-width (cons (selected-frame) 0))
File: xemacs-faq.info, Node: Q3.9.2, Next: Q3.9.3, Prev: Q3.9.1, Up: Customization
How can one use resources to change scrollbar colors?
=====================================================
Here's a recap of how to use resources to change your scrollbar
colors:
! Motif scrollbars
Emacs*XmScrollBar.Background: skyblue
Emacs*XmScrollBar.troughColor: lightgray
! Athena scrollbars
Emacs*Scrollbar.Foreground: skyblue
Emacs*Scrollbar.Background: lightgray
Note the capitalization of `Scrollbar' for the Athena widget.
File: xemacs-faq.info, Node: Q3.9.3, Next: Q3.9.4, Prev: Q3.9.2, Up: Customization
Moving the scrollbar can move the point; can I disable this?
============================================================
When I move the scrollbar in an XEmacs window, it moves the point as
well, which should not be the default behavior. Is this a bug or a
feature? Can I disable it?
The current behavior is a feature, not a bug. Point remains at the
same buffer position as long as that position does not scroll off the
screen. In that event, point will end up in either the upper-left or
lower-left hand corner.
This cannot be changed.
File: xemacs-faq.info, Node: Q3.9.4, Next: Q3.10.1, Prev: Q3.9.3, Up: Customization
How can I get automatic horizontal scrolling?
=============================================
By the same token, how can I turn it off in specific modes?
To do this, add to your `.emacs' file:
(require 'auto-show)
Then do `(setq truncate-lines t)' in the mode-hooks for any modes in
which you want lines truncated.
More precisely: If `truncate-lines' is nil, horizontal scrollbars
will never appear. Otherwise, they will appear only if the value of
`scrollbar-height' for that buffer/window/etc. is non-zero. If you do
(set-specifier scrollbar-height 0)
then horizontal scrollbars will not appear in truncated buffers
unless the package specifically asked for them.
Automatic horizontal scrolling is now standard, starting with 19.14.
File: xemacs-faq.info, Node: Q3.10.1, Next: Q3.10.2, Prev: Q3.9.4, Up: Customization
How can I turn off or change highlighted selections?
====================================================
The `zmacs' mode allows for what some might call gratuitous
highlighting for selected regions (either by setting mark or by using
the mouse). This is the default behavior. To turn off, add the
following line to your `.emacs' file:
(setq zmacs-regions nil)
You can also change these with Customize. Select from the `Options'
menu `Customize->Emacs->->Editing->Basics->Zmacs Regions' or type `M-x
customize RET editing-basics RET'.
To change the face for selection, look at `Options->Customize' on
the menubar.
File: xemacs-faq.info, Node: Q3.10.2, Next: Q3.10.3, Prev: Q3.10.1, Up: Customization
How do I get that typing on an active region removes it?
========================================================
I want to change things so that if I select some text and start
typing, the typed text replaces the selected text, similar to Motif.
You want to use something called "pending delete". Pending delete
is what happens when you select a region (with the mouse or keyboard)
and you press a key to replace the selected region by the key you typed.
Usually backspace kills the selected region.
To get this behavior, add the following line to your `.emacs':
(turn-on-pending-delete)
Note that this will work with both Backspace and Delete.
File: xemacs-faq.info, Node: Q3.10.3, Next: Q3.10.4, Prev: Q3.10.2, Up: Customization
Can I turn off the highlight during isearch?
============================================
I do not like my text highlighted while I am doing isearch as I am
not able to see what's underneath. How do I turn it off?
Put the following in your `.emacs':
(setq isearch-highlight nil)
You can also change these with Customize. Type `M-x
customize-variable RET isearch-highlight RET'.
Note also that isearch-highlight affects query-replace and ispell.
Instead of disabling isearch-highlight you may find that a better
solution consists of customizing the `isearch' face.
File: xemacs-faq.info, Node: Q3.10.4, Next: Q3.10.5, Prev: Q3.10.3, Up: Customization
How do I turn off highlighting after `C-x C-p' (mark-page)?
===========================================================
Put this in your `.emacs':
(setq zmacs-regions nil)
*Warning: This command turns off all region highlighting.*
Also *Note Q3.10.1::.
File: xemacs-faq.info, Node: Q3.10.5, Prev: Q3.10.4, Up: Customization
The region disappears when I hit the end of buffer while scrolling.
===================================================================
How do I turn this feature (if it indeed is a feature) off?
Like this:
(defadvice scroll-up (around scroll-up freeze)
(interactive "_P")
(let ((zmacs-region-stays t))
(if (interactive-p)
(condition-case nil
ad-do-it
(end-of-buffer (goto-char (point-max))))
ad-do-it)))
(defadvice scroll-down (around scroll-down freeze)
(interactive "_P")
(let ((zmacs-region-stays t))
(if (interactive-p)
(condition-case nil
ad-do-it
(beginning-of-buffer (goto-char (point-min))))
ad-do-it)))
Thanks to T. V. Raman <raman@adobe.com> for assistance in deriving
this answer.
File: xemacs-faq.info, Node: Subsystems, Next: Miscellaneous, Prev: Customization, Up: Top
Major Subsystems
****************
This is part 4 of the XEmacs Frequently Asked Questions list. This
section is devoted to major XEmacs subsystems.
* Menu:
Reading Mail with VM:
* Q4.0.1:: How do I set up VM to retrieve remote mail using POP?
* Q4.0.2:: How do I get VM to filter mail for me?
* Q4.0.3:: How can I get VM to automatically check for new mail?
* Q4.0.4:: [This question intentionally left blank]
* Q4.0.5:: How do I get my outgoing mail archived?
* Q4.0.6:: I have various addresses at which I receive mail. How can I tell VM to ignore them when doing a "reply-all"?
* Q4.0.7:: Is there a mailing list or FAQ for VM?
* Q4.0.8:: Remote Mailreading with VM.
* Q4.0.9:: rmail or VM gets an error incorporating new mail.
* Q4.0.10:: How do I make VM stay in a single frame?
* Q4.0.11:: How do I make VM or mh-e display graphical smilies?
* Q4.0.12:: Customization of VM not covered in the manual or here.
Web browsing with W3:
* Q4.1.1:: What is W3?
* Q4.1.2:: How do I run W3 from behind a firewall?
* Q4.1.3:: Is it true that W3 supports style sheets and tables?
Reading Netnews and Mail with Gnus:
* Q4.2.1:: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus,argh!
* Q4.2.2:: [This question intentionally left blank]
* Q4.2.3:: How do I make Gnus stay within a single frame?
* Q4.2.4:: How do I customize the From: line?
Other Mail & News:
* Q4.3.1:: How can I read and/or compose MIME messages?
* Q4.3.2:: What is TM and where do I get it?
* Q4.3.3:: Why isn't this `movemail' program working?
* Q4.3.4:: Movemail is also distributed by Netscape? Can that cause problems?
* Q4.3.5:: Where do I find pstogif (required by tm)?
Sparcworks, EOS, and WorkShop:
* Q4.4.1:: What is SPARCworks, EOS, and WorkShop
Energize:
* Q4.5.1:: What is/was Energize?
Infodock:
* Q4.6.1:: What is Infodock?
Other Unbundled Packages:
* Q4.7.1:: What is AUC TeX? Where do you get it?
* Q4.7.2:: Are there any Emacs Lisp Spreadsheets?
* Q4.7.3:: Byte compiling AUC TeX on XEmacs 19.14
* Q4.7.4:: Problems installing AUC TeX
* Q4.7.5:: Is there a reason for an Emacs package not to be included in XEmacs?
File: xemacs-faq.info, Node: Q4.0.1, Next: Q4.0.2, Prev: Subsystems, Up: Subsystems
How do I set up VM to retrieve mail from a remote site using POP?
=================================================================
Use `vm-spool-files', like this for example:
(setq vm-spool-files '("/var/spool/mail/wing"
"netcom23.netcom.com:110:pass:wing:MYPASS"))
Of course substitute your actual password for MYPASS.
File: xemacs-faq.info, Node: Q4.0.2, Next: Q4.0.3, Prev: Q4.0.1, Up: Subsystems
How do I get VM to filter mail for me?
======================================
One possibility is to use procmail to split your mail before it gets
to VM. I prefer this personally, since there are many strange and
wonderful things one can do with procmail. Procmail may be found at
<URL:ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail/>.
Also see the Mail Filtering FAQ at:
<URL:http://www.cis.ohio-state.edu/hypertext/faq/usenet/mail/filtering-faq/faq.html>.
File: xemacs-faq.info, Node: Q4.0.3, Next: Q4.0.4, Prev: Q4.0.2, Up: Subsystems
How can I get VM to automatically check for new mail?
=====================================================
John Turner <turner@lanl.gov> writes:
Use the following:
(setq vm-auto-get-new-mail 60)
File: xemacs-faq.info, Node: Q4.0.4, Next: Q4.0.5, Prev: Q4.0.3, Up: Subsystems
[This question intentionally left blank]
========================================
Obsolete question, left blank to avoid renumbering.
File: xemacs-faq.info, Node: Q4.0.5, Next: Q4.0.6, Prev: Q4.0.4, Up: Subsystems
How do I get my outgoing mail archived?
=======================================
(setq mail-archive-file-name "~/outbox")
File: xemacs-faq.info, Node: Q4.0.6, Next: Q4.0.7, Prev: Q4.0.5, Up: Subsystems
I have various addresses at which I receive mail. How can I tell VM to ignore them when doing a "reply-all"?
=============================================================================================================
Set `vm-reply-ignored-addresses' to a list, like
(setq vm-reply-ignored-addresses '("wing@netcom[0-9]*.netcom.com"
"wing@netcom.com" "wing@666.com"))
Note that each string is a regular expression.
File: xemacs-faq.info, Node: Q4.0.7, Next: Q4.0.8, Prev: Q4.0.6, Up: Subsystems
Is there a mailing list or FAQ for VM?
======================================
A FAQ for VM exists at
<URL:http://www.cyberpass.net/~gorkab/vmfaq.htm>.
VM has its own newsgroups gnu.emacs.vm.info and gnu.emacs.vm.bug.